import service from '@/utils/request'

const InstitutionApi = {
  addInstitution: function (data) {
    return service.post('institu', data);
  },
  editInstitution: function (data) {
    return service.put('institu', data);
  },
  deleteInstitution: function (data) {
    return service.delete('institu', {params: data });
  },
  getInstitution: function (data) {
    return service.get('institu', {params: data });
  },
  listInstitution: function (data) {
    return service.get('institus', {params: data });
  },
  insSampleTypes: function (data) {
    // 更具机构id获取重名的列
    return service.get('institution/sample/listInsSample', {params: data });
  },
  getInsByHos: function (data) {
    // 通过医院id获取医检列表
    return service.get('institu/byHospital', {params: data });
  },
  listInsByHosItemId:function(data){
    // 通过医院项目组id来获取医检列表
    return service.get("institu/listInsByHosItemId",{params:data})
},
  selectInsByUser: function (data) {
    // 获取机构列表
    return service.get('institu/selectInsByUser', {params: data });
  },
  getInstitutionNameList: function (data) {
    // 获取机构数据列表 id+name
    return service.get('institu/institutionName', {params: data });
  },

  batchSetBusinessMan: function (data) {
    // 批量设置业务员
    return service.post('institutionUserRelation/batchAddData', data);
  }


}

export default InstitutionApi
